package com.xm.utils;

	import com.google.gson.Gson;

	public class Result {
		private int code;
		private String msg;
		private int count;
		private Object data;

		public Result(int code, String msg, int count, Object data) {
			this.code = code;
			this.msg = msg;
			this.count = count;
			this.data = data;
		}

		public Result(int count, Object data) {
			this.code = 0;
			this.msg = "success";
			this.count = count;
			this.data = data;

		}

		public Result(int code, String msg) {
			this.code = 1;
			this.msg = msg;

		}

		public String toJson() {
			Gson gson = new Gson();

			return gson.toJson(this);
		}

	}


